import request2, { downloadPost } from '@/utils/request2'
import { safetyApiUrl, unionApiUrl } from '@/api/config'

export default {
  /**
   会议列表-添加安全检查
   */
  createByMain(params, data) {
    return request2({
      url: safetyApiUrl + '/safety-inspection-meeting/createByMain',
      method: 'post',
      params, data
    })
  },
  /**
   会议列表-编辑安全检查
   */
  editByMain(params, data) {
    return request2({
      url: safetyApiUrl + '/safety-inspection-meeting/editByMain',
      method: 'post',
      params, data
    })
  },
  /**
   会议列表-编辑考核评分-编辑隐患项
   */
  editExamineGrade(params, data) {
    return request2({
      url: safetyApiUrl + '/safety-inspection-meeting/editExamineGrade',
      method: 'post',
      params, data
    })
  },
  /**
   会议列表-列表查询
   */
  findListByMain(params, data) {
    return request2({
      url: safetyApiUrl + '/safety-inspection-meeting/findListByMain',
      method: 'post',
      params, data
    })
  },
  /**
   会议列表-根据Id查询详情
   */
  findById(params, data) {
    return request2({
      url: safetyApiUrl + '/safety-inspection-meeting/findById/' + params.id,
      method: 'get',
      params, data
    })
  },
  del(params) {
    return request2({
      url: safetyApiUrl + '/safety-inspection-meeting/deleteById/' + params.id,
      method: 'get',
      params
    })
  },
  findErWeiById(params) {
    return request2({
      url: safetyApiUrl + '/safety-inspection-meeting/findErWeiById/' + params.id,
      method: 'get',
      params
    })
  },
  // 会议-参会签到人员
  employee(params) {
    return request2({
      url: safetyApiUrl + '/safety-inspection-meeting/employee',
      method: 'get',
      params
    })
  },
  print(params) {
    return request2({
      url: safetyApiUrl + '/safety-inspection-meeting/' + params.id,
      method: 'get',
      params: params
    })
  },
  download(params) {
    return downloadPost(safetyApiUrl + '/safety-inspection-meeting/downLoad?id=' + params.id, {}, {}, '安全检查记录.docx')
  }
}